#!/bin/bash
clear
echo Welcome to MyneSync!
echo "(c) 2012 by BOBdotEXE"
echo
mkdir ~/.mynesync
mkdir ~/Dropbox/MyneSync
mkdir ~/Dropbox/MyneSync/saves
mkdir ~/Dropbox/MyneSync/mods


   echo "Minecraft Launcher not found!!"
   echo "Don't Worry i'll go get one for you! :D"
   wget -q "https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar" -O ~/.mynesync/minecraft.jar
   echo Alright! I downloaded it for you!
   echo
   echo Ready to procede!
   clear
   echo Importing data from cloud...
   echo
   echo Maps...
   cp -r ~/Dropbox/MyneSync/saves ~/.minecraft/saves/*
   echo Done!
   echo
   
   echo Mods...
   cp -r ~/Dropbox/MyneSync/mods  ~/.minecraft/mods/* 
   echo Done!
   
   echo Texture Packs...
   cp -r ~/Dropbox/MyneSync/texturepacks ~/.minecraft/texturepacks/*
	echo Done!
	
clear
echo All files downloaded!
echo
echo Launching Minecraft...

java -jar ~/.mynesync/minecraft.jar
 
 #--------------------------------------------------------------  
  clear 
   echo Uploading data to Cloud...
   echo
   echo Maps...
   cp -r ~/.minecraft/saves/* ~/Dropbox/MyneSync/saves
   echo Done!
   echo
   
   echo Mods...
   cp -r ~/.minecraft/mods/* ~/Dropbox/MyneSync/mods
   echo Done!
   
   echo Texture Packs...
   cp -r ~/.minecraft/texturepacks/* ~/Dropbox/MyneSync/texturepacks
	echo Done!
	
	echo all filles have been added to dropbox!
	echo BE SURE TO WAIT FOR DROPBOX TO FINISH SYNCING BEFORE
	echo SHUTTING DOWN OR LOGGING OFF YOUR COMPUTER!!!!

	
